home *** CD-ROM | disk | FTP | other *** search
/ Amiga News 95 / Amiga News 95.iso / dpat / dpat94 / rexx / sendvideotex.rexx < prev    next >
OS/2 REXX Batch file  |  1995-01-23  |  2KB  |  68 lines

  1. /*--------------------------------------*/
  2. /* SendVideotex.rexx v1.1   © 1995 Ldfa */
  3. /*                                      */
  4. /*  Envoi filtré d'un fichier Videotex  */
  5. /*    sur un serveur pour AmiTEL 2.1    */
  6. /*                                      */
  7. /*--------------------------------------*/
  8.  
  9. NL        = '0a'x
  10. Return        = '0d'x
  11. Envoi        = '13 41'x
  12. Retour        = '13 42'x
  13. Repetition    = '13 43'x
  14. Guide        = '13 44'x
  15. Annulation    = '13 45'x
  16. Sommaire    = '13 46'x
  17. Correction    = '13 47'x
  18. Suite        = '13 48'x
  19.  
  20. ADDRESS AMITEL_REXX
  21.  
  22. OPTIONS results
  23.  
  24. REQINFO "Ce programme permet d'envoyer un fichier" || NL,
  25.     "Vidéotex préparé à l'avance sur un serveur" || NL,
  26.     "en filtrant certains codes Vidéotex." || NL,
  27.     "Voulez vous continuer?"
  28.  
  29. if RESULT == 0 then exit
  30.  
  31. REQFILE "Nom du Fichier à envoyer"
  32.  
  33. if RESULT == "RESULT" then exit
  34.  
  35. Success = open('Fichier',RESULT,'R')
  36.  
  37. if Success == 0 then
  38.    do
  39.       REQINFO "Fichier non trouvé!"
  40.       exit
  41.    end
  42.  
  43. Char = 'A'
  44.  
  45. do while eof('Fichier') == 0
  46.    Char = readch('Fichier',1)
  47.    select
  48. /*    when Char = '08'x then SEND '$08' */
  49. /*    when Char = '09'x then SEND '$09' */
  50. /*    when Char = '0a'x then SEND '$0a' */
  51. /*    when Char = '0b'x then SEND '$0b' */
  52.       when Char = '0c'x then SEND '$0c'
  53.       when Char = '0d'x then SEND '$0d'
  54.       when Char = '0e'x then SEND '$0e'
  55.       when Char = '0f'x then SEND '$0f'
  56. /*    when Char = '19'x then SEND '$19' */
  57.       when Char = '1b'x then SEND '#'
  58.       when Char = '1f'x then SEND '$1f'
  59.       when Char = '23'x then SEND '$23'
  60.       when Char = '24'x then SEND '$24'
  61.       when Char = '2a'x then SEND '$2a'
  62.       otherwise              SEND Char
  63.    end
  64. end
  65.  
  66. REQINFO "Envoi du fichier terminé."
  67.  
  68.